--hset操作
local interval = tonumber(ARGV[2]);
local likedMapKey = KEYS[1];
local likedInfoKey = KEYS[2];
local likedCount = KEYS[3];
local likedFlag = ARGV[1];
if 1 == redis.call('EXISTS',likedMapKey)
then
    redis.call('HSET', likedMapKey, likedInfoKey,likedFlag)
    redis.call('INCR', likedCount)
else
    redis.call('HSET', likedMapKey, likedInfoKey,likedFlag)
    redis.call("expire", likedMapKey, interval)
    redis.call('INCR', likedCount)
    redis.call("expire", likedCount, interval)
end
return redis.call('GET',likedCount)
